package ch.elca.lol.puissance4.game;

/** Playable tokens. */
public enum Token {
	O, X;
	
	public Token next() {
		switch(this) {
			case O:
				return X;
			case X:
				return O;
			default:
				return null;
		}
	}
	
	public static Token fromChar(char c) {
		switch(c) {
			case 'X':
				return Token.X;
			case 'O':
				return Token.O;
			default:
				return null;
		}
	}
}
